package com.hy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hy.entity.dto.HyPropertySearchDTO;
import com.hy.entity.dto.PrinterPropertySearchDto;
import com.hy.entity.pojo.HyProperty;
import com.hy.entity.vo.HyPropertyVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.core.parameters.P;

import java.util.List;
import java.util.Map;

public interface HyPropertyMapper extends BaseMapper<HyProperty> {
    List<HyPropertyVO> findHyPropertyListByMap(Map<String, Object> beanToMap);

    Integer getTotalCount(Map<String,Object> queryCondition);

    List<HyPropertyVO> findHyPropertyListByCondition(Map<String, Object> queryCondition);

    Integer getCountByDto(HyPropertySearchDTO dto);

    List<HyPropertyVO> findHyPropertyListByDto(Map<String, Object> queryCondition);

    List<HyPropertyVO> getPropertyByDto(@Param("page") Page<HyPropertyVO> page, @Param("dto") PrinterPropertySearchDto searchDto);

    HyPropertyVO getPropertyById(Integer id);

    HyPropertyVO getPropertyByEpc(String epc);

    HyProperty getPropertyByUnitAndRfid(@Param("unitId") Integer unitId, @Param("rfid") Integer propertyRfid, @Param("taskId") Integer taskId);

    HyPropertyVO getPropertyByCode(String propertyCode);
}
